package com.szpx.service.classgroupsservice.impl;

import com.szpx.entity.User;
import com.szpx.entity.classgroups.ClassGroups;
import com.szpx.mapper.UserMapper;
import com.szpx.mapper.classGroups.ClassGroupsMapper;
import com.szpx.service.classgroupsservice.ClassGroupsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional //事务处理策略
public class ClassGroupsServiceImpl implements ClassGroupsService {

    @Autowired
    private ClassGroupsMapper classGroupsMapper;


    @Override
    public List<ClassGroups> selectAllClassGroups() {
        return classGroupsMapper.selectAll();
    }

//    @Override
//    public ClassGroups selectClassGroupsById(Integer id) {
//        return classGroupsMapper.selectByPrimaryKey(id);
//    }

//    @Override
//    public List<User> selectAllUser() {
//        return userMapper.selectAll();
//    }
//
//    @Override
//    public int addUser(User user) {
//        return userMapper.insertSelective(user);
//    }
//
//    @Override
//    public int delUser(Integer id) {
//        return userMapper.deleteByPrimaryKey(id);
//    }
//
//    @Override
//    public int updateUser(User user) {
//        return userMapper.updateByPrimaryKeySelective(user);
//    }
//
//    @Override
//    public User login(User user) {
//        return userMapper.selectOne(user);
//    }
//
//    @Override
//    public List<User> getListByCon(User user) {
//        return userMapper.getListByCon(user);
//    }
}
